package com.UnionPayCenter.mapper;

import com.UnionPayCenter.base.MyMapper;
import com.UnionPayCenter.entity.UserCouponEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface UserCouponMapper extends MyMapper<UserCouponEntity> {


    int countNotUse(@Param("userId") Long userId, @Param("status") String status);

    /**
     * 更新优惠券用户Id
     *
     * @param userId    用户id
     * @param couponsId 优惠券Id
     * @return 更新记录数
     */
    int updateUserId(@Param("userId") Long userId, @Param("couponsId") String couponsId);
}
